//原文链接
//https://blog.csdn.net/ITSOK_123/article/details/124228086
//双向指针
class Solution {
public:
    void reverseString(vector<char>& s) {
        for(int i=0,j=s.size()-1;i<j;i++,j--){
            swap(s[i],s[j]);
        }
    }
};

//单向指针
class Solution {
public:
    void reverseString(vector<char>& s) {
        int len = s.size();
        for(int i=0;i<len/2;i++){
            swap(s[i],s[len-i-1]);
        }
    }
};
